package com.yellowpage.wf.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import java.util.Date;

/**
 * Context entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WF_ATTACHMENT_INSTANCE")
public class AttachmentInstance implements java.io.Serializable {

	// Fields

	private Long attachmentInstanceId;
	private Long version;
	private Long workflowInstanceId;
	private Long attachmentId;
	private Long resourceId;
	private String note;

	// Constructors

	/** default constructor */
	public AttachmentInstance() {
	}

	/** full constructor */
	public AttachmentInstance(Long version, Long workflowInstanceId, Long attachmentId, Long resourceId
			 ,String note) {
		this.version = version;
		this.workflowInstanceId = workflowInstanceId;
		this.attachmentId = attachmentId;
		this.resourceId = resourceId;
		this.note = note;
	}
	
	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ATTACHMENT_INSTANCE_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getAttachmentInstanceId() {
		return attachmentInstanceId;
	}
	public void setAttachmentInstanceId(Long attachmentInstanceId) {
		this.attachmentInstanceId = attachmentInstanceId;
	}
	@Column(name = "VERSION", precision = 18, scale = 0)
	public Long getVersion() {
		return version;
	}
	public void setVersion(Long version) {
		this.version = version;
	}
	@Column(name = "WORKFLOW_INSTANCE_ID", precision = 18, scale = 0)
	public Long getWorkflowInstanceId() {
		return workflowInstanceId;
	}
	public void setWorkflowInstanceId(Long workflowInstanceId) {
		this.workflowInstanceId = workflowInstanceId;
	}
	@Column(name = "ATTACHMENT_ID", precision = 18, scale = 0)
	public Long getAttachmentId() {
		return attachmentId;
	}
	public void setAttachmentId(Long attachmentId) {
		this.attachmentId = attachmentId;
	}
	@Column(name = "RESOURCE_ID", precision = 18, scale = 0)
	public Long getResourceId() {
		return resourceId;
	}
	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}
	@Column(name = "NOTE", length = 128)
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	
}